package com.eh.proxy.remote.remote.state;

import com.eh.proxy.remote.remote.base.AbstractState;
import com.eh.proxy.remote.remote.model.GumballMachine;

/**
 * Created by David on 2016/5/1.
 */
public class NoQuarterState extends AbstractState {
    private static final long serialVersionUID = 3688056892755447429L;

    public NoQuarterState(GumballMachine gumballMachine) {
        super(gumballMachine);
    }

    @Override
    public void insertQuarter() {
        System.out.println("You inserted a quarter.");
        gumballMachine.setCurrentState(gumballMachine.getHasQuarterState());
    }

    @Override
    public String toString() {
        return "等待投入钱币";
    }
}
